Upload Operator Connect Numbers Patch
The Upload Operator Connect Numbers Patch request lets you update specific Operator Connect number properties and then asynchronously update the Microsoft platform. A workflow process is implemented to streamline the synchronization mechanism. This process groups numbers for each Microsoft tenant and processes each scope independently. A failure in the processing for one scope, for example, "Capabilities" does not cause a rollback for another scope, for example, "Configuration".
| ■ | Backend Scopes: Live Platform processes each parameter in the request into one of the following scopes: |
| ● | Capabilities: capabilities parameter that is processed using Microsoft tn-capability-update API. |
| ● | Configuration: callingProfileId, locationId, usage, additionalUsages, allowedCustomerActions, routingOptions that is processed using Microsoft tn-update-orders API. |
| ● | SbcScript: scriptTemplateId, scriptParameters. Executes a Handlebars script template on all SBC devices where the numbers are stored. Limit: 500 numbers per request in this scope. |
| ■ | Validation Rules: Synchronous checks before the workflow process commences. In the event where these checks fail, "400: Bad Request" is returned (scenarios are described in 400 Bad Request: Bad requests may include the following scenarios:). |
Rate Limit
This request has a global rate limit of 300 calls per minute. Exceeding this limit will result in a HTTP 429: Too Many Requests error.
URI
{{baseUrl}}/api/v3/oc/numbers
HTTP Method
PATCH
Request Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
msTenantId |
string |
Microsoft TenantId (Azure Tenant ID of the customer). |
Request Body
|
Parameter |
Type |
Description |
|||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
idempotencyKey |
string |
An idempotencyKey is used to enable safe retries to prevent sending duplication requests to Microsoft for update actions to the same number.
|
|||||||||||||||||||||||||||||||||||||||||||||
|
ticket ID |
Related Service Request ticket (see Managing Service Requests). |
Ticket ID |
|||||||||||||||||||||||||||||||||||||||||||||
|
numbers |
list array |
A list of telephone numbers including capabilities (add and remove).
Phone number validation rules are in accordance with E.164 format:
Local telephone number or subscriber number. It has the following structure: [+][country code][area code][subscriber number]. Example of a number with E.164 format in the United States Telephone number: 415 123 1234 E.164 format number: +14151231234
Valid country code, per civic address and/or contact info of the given lead. See Country Dialing Codes. |
|||||||||||||||||||||||||||||||||||||||||||||
|
capabilities |
Each Add/Remove Usage/Capability must include at least one item. |
One of the following values with matching supported usages (see above) (configure bolded value):
|
|||||||||||||||||||||||||||||||||||||||||||||
|
callingProfileId |
string |
The Id string for the Microsoft Operator Connect Calling Profile that is attached to the tenant service (see Get Calling Profiles). Each Calling Profile is mapped to an SBC trunk used to manage call functionality for tenant service. |
|||||||||||||||||||||||||||||||||||||||||||||
|
locationId |
string |
Id of the site location (see Get Services Brief Details (V3)). |
|||||||||||||||||||||||||||||||||||||||||||||
|
usage |
integer |
One of the following values (mapping to Teams admin center values is shown in parentheses):
Verify that the 'ThirdPartyAppAssignment' value is supported on your Microsoft tenant. |
|||||||||||||||||||||||||||||||||||||||||||||
|
additionalUsage |
|
Support for an Additional usage type. For example if you configure 'CallingUserAssignment' as the Usage, then you can choose 'Conference Assignment' or 'FirstPartyAppAssignment' for the Additional Usage. Configuration of Additional usage requires workflow Version 3. |
|||||||||||||||||||||||||||||||||||||||||||||
|
allowedCustomerActions |
|
For future use |
|||||||||||||||||||||||||||||||||||||||||||||
|
routingOptions |
|
For future use |
|||||||||||||||||||||||||||||||||||||||||||||
|
scriptTemplateId |
integer |
The unique id of the script. See SBC Template Scenarios for references to IDs for default SBC script templates. See M365 Template Scenarios for references to IDs for default M365 script templates. This value is mandatory if you configure script parameters (see below). |
|||||||||||||||||||||||||||||||||||||||||||||
|
scriptParameters refers to: CustomVar.Variable<VariableSequenceNumber> |
dictionary where <VariableSequenceNumber> is the sequence in database that the variable is defined in the 'Customer variables' column for the script properties (see Customer Variables). For example, when the following IP-PBX variables are defined in the database in the order: IPPBX-ProxyAddress, IPPBX-ProxyAddress-SIPPort, SIP-HostName then Custom variables should be defined as follows:
|
Custom variables can be defined to update specific parameters on the SBC device. These variables must be predefined in the UMP-365 database (see Customer Variables). Also verify that the custom variables notation has been added to the script (see parameter 'sbcOnboardingScript' above) that you are applying to the request. There are three fields displayed in the schema additionalProp1-3, however there is no limitation for the number of variables that can be added. |
|||||||||||||||||||||||||||||||||||||||||||||
|
additionalProp1 |
string |
Custom Script variable argument. For example "CacProfile": "5 sessions" |
|||||||||||||||||||||||||||||||||||||||||||||
|
additionalProp2 |
string |
Custom Script argument. For example, ProxySet": "SIPTrunk", |
|||||||||||||||||||||||||||||||||||||||||||||
|
additionalProp3 |
string |
Custom Script argument. For example, "OnlinePstnGateway": "sandbox1.audiocodes.be" |
Example Request Body
{
"idempotencyKey": "r2c4d3d5-vbgt-6540-erfu-ef1234554380",
"ticketId": "TICKET-001",
"numbers": [
{
"telephoneNumber": "+61395557002",
"callingProfileId": "fcdd70da-df67-4ac5-a9fa-5d69da190622",
"capabilities": { "add": ["InboundCalling"], "remove": [] }
},
{
"telephoneNumber": "+61395557004",
"scriptTemplateId": 2020,
"scriptParameters": { "ProxySet": "SIPTrunk" }
}
]
}
202 Accepted Response
The initial response displays the Task Id.
|
Parameter |
Type |
Description |
|---|---|---|
|
Task Id |
string |
The queued task Id that is generated for this action. You must run the Task request to retrieve the status of the action. See Task Status. Note that the wup string in the prefix is unique for this endpoint. |
{
"taskId": "wup_c14a0a55-fcc5-4598-b405-c978e7da1af4"
}
The execution of the request may take a few minutes. The status will progress from 'In Progress' to 'Completed Success'.
{
"numbers": [
{
"number": "+61395557002",
"status": "Submitted",
"failures": null
},
{
"number": "+61395557004",
"status": "Pending",
"failures": null
}
],
"id": "ocn_p_14ce135c-15f1-4ff2-be62-4760a7d30a2d",
"status": "Queued",
"executionMessages": [
{
"level": "User",
"message": "Starting patch operation for 2 number(s) across 1 tenant(s)."
},
{
"level": "Information",
"message": "Started child workflow c6906169-c565-4b94-8a69-3ba618e9225c for tenant '3bc57cac-5794-457f-ad36-2c88cade9dbb'."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Locking 2 number(s) for exclusive access."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Acquired exclusive access to 2 number(s)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Lock acquired."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Submitting capability update for 1 number(s)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update submitted to Microsoft Operator Connect."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update order submitted (MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking capability update status (attempt 1/15, MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update in progress. Next check in 60s."
}
],
"outputData": {},
"createTime": "2026-07-07T08:16:54.6103857Z"
}
{
"numbers": [
{
"number": "+61395557002",
"status": "Completed",
"failures": null
},
{
"number": "+61395557004",
"status": "Completed",
"failures": null
}
],
"id": "ocn_p_14ce135c-15f1-4ff2-be62-4760a7d30a2d",
"status": "CompletedSuccess",
"executionMessages": [
{
"level": "User",
"message": "Starting patch operation for 2 number(s) across 1 tenant(s)."
},
{
"level": "Information",
"message": "Started child workflow c6906169-c565-4b94-8a69-3ba618e9225c for tenant '3bc57cac-5794-457f-ad36-2c88cade9dbb'."
},
{
"level": "Information",
"message": "Detected child c6906169-c565-4b94-8a69-3ba618e9225c completed (status=Complete); 1/1 done."
},
{
"level": "User",
"message": "Patch operation completed: 1 of 1 tenant(s) succeeded."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Locking 2 number(s) for exclusive access."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Acquired exclusive access to 2 number(s)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Lock acquired."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Submitting capability update for 1 number(s)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update submitted to Microsoft Operator Connect."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update order submitted (MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking capability update status (attempt 1/15, MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update in progress. Next check in 60s."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking capability update status (attempt 2/15, MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update confirmed by Microsoft."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update completed successfully."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Submitting configuration update for 1 number(s)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update submitted to Microsoft Operator Connect."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update order submitted (MS order: 138ddbfe-8d02-47bc-a6c1-ac3431c4619e)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking configuration update status (attempt 1/15, MS order: 138ddbfe-8d02-47bc-a6c1-ac3431c4619e)."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update in progress. Next check in 60s."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking configuration update status (attempt 2/15, MS order: 138ddbfe-8d02-47bc-a6c1-ac3431c4619e)."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update confirmed by Microsoft."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update completed successfully."
},
{
"level": "User",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Exclusive access released."
},
{
"level": "Information",
"message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Lock released."
}
],
"outputData": {},
"createTime": "2026-07-07T08:16:54.6103857Z",
"completeTime": "2026-07-07T08:19:21.6337647Z"
}
HTTP Responses
| ■ | 200 OK |
|
Parameter |
Type |
Description |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id |
string |
Task Id |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
status |
string |
Task status is one of the following
The cache mechanism used to Upload numbers is according to Distributed Cache. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
details |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
executionMessages |
list array |
This list array includes the following parameters:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
level |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
message |
string |
The following 'Information' messages may appear:
The following 'Error' messages may appear:
The following includes example error messages:
Copy
Copy
Copy
Copy
Copy
Copy
Copy
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
outputData |
List array |
This array includes the following parameters:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CreateTime |
string($date-time) |
Timestamp at the commencement of the number upload. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CompleteTime |
string($date-time) |
Timestamp at the completion of the number upload. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
OcUploadNumberResult |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
WorkflowVersion |
integer |
Version of the Workflow API. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SbcIdList |
integer |
Id of the SBC device in the Live Platform database. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MsJobWhenUpdated |
string($date-time) |
Timestamp when the Microsoft tenant platform was updated with the new number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MsJobId |
string |
Id of the job to update the Microsoft platform. |
| ■ | 400 Bad Request: Bad requests may include the following scenarios: |
| ● | The number list array is empty |
| ● | Duplicate telephone numbers are specified in the list |
| ● | The Add or Remove capability list array is empty |
| ● | Numbers specified are not in the valid E.164 format |
| ● | Numbers specified do not exist in the number inventory |
| ● | Script parameters have been configured, however, a scriptTemplateId has not been configured |
| ● | The specified scriptTemplateId does not exist |
| ● | Numbers specified have not been configured on the SBC |
| ● | The request exceeds 500 numbers |
{
"status": 400,
"title": "Numbers Not Found",
"errorCode": "NUMBERS_NOT_FOUND",
"invalidNumbers": ["+14155559999"],
"traceId": "00-abc123-def456-00"
}
| ■ | 409 Conflict: |
| ● | If any number in the batch has a pending operation in the same scope, the entire request is rejected. In this case, the following error is returned including a list array of the conflicting (locked) numbers. |
{
"status": 409,
"title": "Concurrent Operation",
"errorCode": "CONCURRENT_OPERATION",
"lockedNumbers": ["+14155551234"],
"traceId": "00-abc123-def456-00"
}
| ● | If a previous SBC script scope failure arose on any number, this number is blocked from further PATCH operations until the following error is cleared: |
NUMBER_IN_INFRASTRUCTURE_ERROR_STATE and an errorStateNumbers array.